<?php 
namespace app\admin\controller;
use app\common\controller\Base;
use app\common\model\AdminUser;
use app\common\model\AdminLog;
use think\Session;
/**
 * @Author: YeMiao
 * @Date:   2017-07-29 15:03:52
 * @Last Modified by:   YeMiao
 * @Last Modified time: 2017-11-06 15:35:30
 */


class Index extends Base{
// 后台入口
	public function index(){
		$user = new AdminUser();
		$find = $user->find_user(input('session.user'));
		$this->assign('to_url',input('cookie.to_url'));
		cookie('to_url',null);
		$this->assign('data',$find);
		return $this->fetch();
	}

	public function home(){
		echo phpinfo();
		return $this->fetch();
	}
	public function out(){
		$log = new AdminLog();
		$log->add_log('退出');
		Session::clear();
		$this->success('已退出！','login/index');
	}
}


 ?>